import * as types from '../types'

import { Map } from 'immutable'

const reducer = (state = Map({
    bannerList: [],
    proList: []
}), action) => {
    switch (action.type) {
        case types.CHANGE_BANNER_LIST:

            // return { ...state, bannerList: action.payload }
            return state.set('bannerList', action.payload)
        case types.CHANGE_PRO_LIST:

            // return { ...state, proList: action.payload }
            return state.set('proList', action.payload)
        default:
            return state
    }
}


export default reducer